package app19;

/**
 * Created by Veronica on 2017/4/5.
 */
/*P200 Inconsistent类*/
public class Inconsistent {
    static boolean started = true;

    public static void main(String[] args) {
        Thread thread1 = new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
                }
                started = true;
                System.out.println("start set to true");
            }
        });
        thread1.start();

        while (!started){
            //wait until started
        }
        System.out.println("Wait 3 seconds and exit");
    }
}
